package cn.zwx.goods.svc.mapper;


import cn.zwx.goods.svc.domain.entity.BrandEntity;
import cn.zwx.goods.svc.domain.entity.CategoryBrandEntity;
import cn.zwx.goods.svc.domain.entity.CategoryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author zhangwenxue
* @description 针对表【category_brand】的数据库操作Mapper
* @createDate 2023-12-27 17:05:43
* @Entity generator.domain.CategoryBrand
*/
public interface CategoryBrandMapper extends BaseMapper<CategoryBrandEntity> {

    /**
     * 新增
     * @param record 新增请求参数
     * @return 返回影响行数
     */
    int insertSelective(CategoryBrandEntity record);


    /**
     *  根据品牌id查询类目列表
     * @param brandId 品牌id
     * @return List<CategoryEntity>
     */
    List<CategoryEntity> selectCategoryByBrandId(@Param("brandId") Integer brandId);

    /**
     *  根据类目id查询品牌列表
     * @param categoryId 类目id
     * @return List<CategoryEntity>
     */
    List<BrandEntity> selectListByCategoryId(@Param("categoryId") Long categoryId);
}
